package com.novel.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author huawei
 * redissOn 配置类
 */
@Component
@ConditionalOnProperty(prefix = "com.ftf.tp.redis", value = "enable", havingValue = "true")
@ConfigurationProperties(prefix = "com.ftf.tp.redis")
public class RedissonProperties {
    /**
     * 集群节点，逗分割
     */
    private String nodes;
    /**
     * 主从部署，主名称
     */
    private String master;
    /**
     * 单节点，地址
     */
    private String address;
    /**
     * 密码
     */
    private String password;
    /**
     * 库
     */
    private String database = "1";

    public String getNodes() {
        return nodes;
    }

    public void setNodes(String nodes) {
        this.nodes = nodes;
    }

    public String getMaster() {
        return master;
    }

    public void setMaster(String master) {
        this.master = master;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }
}
